package ord2.search;

import ord2.core.AbstractQuery;
import ord2.core.Result;
import java.util.List;

/**
 * This interface specifies operations that a searcher must provide.
 *
 * @author José Ivan
 * @author Edviges
 *
 * @param <K> Type of object encapsulated by the query.
 * @param <T> Type of objects that will be returned by the query.
 */
public interface Searcher<K, T> {
 
    /**
     * Executes a query by this searcher.
     * @param query Query that will be used.
     * @return Collection of result of type <T> or null if none result.
     */
    List<Result<T>> query(AbstractQuery<K> query);
}
